﻿namespace TS2015.Migrations
{
    using System;
using System.Data.Entity;
using System.Data.Entity.Migrations;
using System.Linq;
using System.Runtime.CompilerServices;
using TS2015.Models;

    internal sealed class Configuration : DbMigrationsConfiguration<TS2015.Models.TS2015Context>
    {
        public Configuration()
        {
            AutomaticMigrationsEnabled = false;
        }
     
        protected override void Seed(TS2015.Models.TS2015Context context)
        {
            context.TbTheLoais.AddOrUpdate(
              new TbTheLoai {MaTheLoai=1, MaTheLoaiCha=0, TenTheLoai="Tin tức",ThuTu=0 },
              new TbTheLoai { MaTheLoai = 2, MaTheLoaiCha = 0, TenTheLoai = "Thông báo", ThuTu = 0 },
              new TbTheLoai { MaTheLoai = 3, MaTheLoaiCha = 0, TenTheLoai = "Tuyển sinh", ThuTu = 0 }
            );

            context.TbHeDaoTaos.AddOrUpdate(
              new TbHeDaoTao { MaHeDaoTao=1,TenHeDaoTao="Đại học"},
              new TbHeDaoTao { MaHeDaoTao = 2, TenHeDaoTao = "Cao đẳng" },
              new TbHeDaoTao { MaHeDaoTao = 3, TenHeDaoTao = "Trung cấp" }
            );
        }
    }
}
